package com.example.demo.suanfa_sort;

/**
 * @program: java_base
 * @description: 右边有多少个 * 2 后还小于本数
 * @author: zhouhongtao
 * @happyCreateTime: 2022/02/14 13:31
 * 不回退 技巧
 */
public class BiggerThanRightTwiceDemo {


    
    public int merge_first(int[] arr,int l,int mid,int r){
        int ans = 0;
        int windowR = mid + 1;
        for (int i = l; i <= mid; i++) {
            while (windowR < r && arr[i] > (arr[windowR]<<1)){
                windowR++;
            }
            ans += windowR - mid - 1;
        }

        int[] retArr = new int[arr.length - 1];
        int s0 = l;
        int s1 = mid + 1;

        // 思路

        return 0;
    }
    
}
